<?php
include('../../inc/global.inc');
include("../islogin.php");
$id = intval($_GET['id']);
$row=$db->get_one("SELECT * FROM `sd_tuoguan` WHERE id=$id");
//$rowcp=$db->get_one("SELECT * FROM `product` WHERE id=".$row['pid']);
$rowmaijia=$db->get_one("SELECT * FROM `sd_yinhang` WHERE userid=".$row['userid']);
$rowmaijia2=$db->get_one("SELECT * FROM `sd_yinhang` WHERE userid=".$row['userid2']);
$rowfahuo=$db->get_one("SELECT * FROM `sd_fahuo` WHERE tuoguanid=$id and userid=".$row['userid2']);//卖家
$rowdakuan=$db->get_one("SELECT * FROM `sd_dakuan` WHERE tuoguanid=$id and userid=".$row['userid']);//买家

?>
<HTML>
<HEAD>
<TITLE>Admin</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<LINK href="../css/css.css" rel=stylesheet>
<script type='text/javascript' src="../js/islogin.js" charset="gb2312"></script>
<script src="../../js/jquery.js"></script>
<style type="text/css">
<!--
td.tdheight { line-height:24px;
}
-->
</style></HEAD>
<BODY>
<center>
  <table width="95%" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
    <tr>
      <td height="25" bgcolor="#EEEEF9" style="padding-left:5px;">订单流程如下&nbsp;&nbsp;<a href="javascript:history.go(-1)">Back</a></td>
    </tr>
  </table>
  <div>
  		<table width="95%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="50%" height="35" align="center" bgcolor="#CCCCCC">买家托管信息(<?php echo $row['username'];?>)</td>
        <td width="50%" height="35" align="center" bgcolor="#CCCCCC">买家银行信息(<?php echo $row['username'];?>)</td>
      </tr>
      
      <tr>
        <td width="50%" align="left" class="tdheight">
        	产品名称：<a href="<?=$row['url']?>" target="_blank"><?=$row['title']?></a><br />
        	申请时间：<?=date("Y-m-d H:i:s",$row['inputtime'])?><br />
        	申请人：<?php echo $row['truename'];?><br />
        	电话：<?php echo $row['tel'];?><br />
        	qq：<?php echo $row['qq'];?><br />
        	email：<?php echo $row['email'];?><br />
        	交易金额：<?php echo $row['price'];?>元<br />
        	备注：<?php echo $row['content'];?><br />        
            ip地址：<?=$row['ip']?>
            </td>
        <td width="50%" align="left" class="tdheight">
        <?php if($rowmaijia){?>
        	收款公司或个人名称：<?php echo $rowmaijia['mc'];?><br />
        	开户银行名称：<?php echo $rowmaijia['khmc'];?><br />
        	开户银行地址：<?php echo $rowmaijia['khdz'];?><br />
        	支付宝姓名：<?php echo $rowmaijia['zubmc'];?><br />
        	支付宝账号：<?php echo $rowmaijia['email'];?><br />
        	添加时间：<?=date("Y-m-d H:i:s",$rowmaijia['inputtime'])?><br />
            ip地址：<?=$rowmaijia['ip']?>
        <?php }?>        </td>
      </tr>
      <tr>
        <td height="35" align="center" bgcolor="#CCCCCC">买家打款信息</td>
        <td height="35" align="center" bgcolor="#CCCCCC">买家收货时间</td>
      </tr>
      <tr>
        <td align="left" class="tdheight">
        <?php if($rowdakuan){?>
        	汇款银行名称：<?php echo $rowdakuan['bankname'];?><br />
        	汇款时间：<?php echo $rowdakuan['dtime'];?><br />
        	汇款金额：<?php echo $rowdakuan['price'];?><br />
        	备注：<?php echo $rowdakuan['content'];?><br />
        	添加时间：<?=date("Y-m-d H:i:s",$rowdakuan['inputtime'])?><br />
            ip地址：<?=$rowdakuan['ip']?>
        <?php }?> 
        </td>
        <td align="left">
        <?php if($row['status']>4){?>
        收货时间：<?=date("Y-m-d H:i:s",$row['updatetime'])?><br />
        <?php }?> 
        </td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="50%" height="35" align="center" bgcolor="#CCCCCC">卖家发货信息(<?php echo $row['username2'];?>)</td>
        <td width="50%" height="35" align="center" bgcolor="#CCCCCC">卖家银行信息(<?php echo $row['username2'];?>)</td>
      </tr>
      
      <tr>
        <td width="50%" align="left" class="tdheight">
        <?php if($rowfahuo){?>
        	发货时间：<?=$rowfahuo['ftime']?><br />
        	物流公司名称：<?php echo $rowfahuo['wlgs'];?><br />
        	物流运单号：<?php echo $rowfahuo['wldh'];?><br />
        	物流联系电话：<?php echo $rowfahuo['qq'];?><br />
        	预计几天到货：<?php echo $rowfahuo['tian'];?>天<br />
        	备注：<?php echo $rowfahuo['content'];?><br />
            ip地址：<?=$rowfahuo['ip']?>
         <?php }?>
        </td>
        <td width="50%" align="left" class="tdheight">
        <?php if($rowmaijia2){?>
        	收款公司或个人名称：<?php echo $rowmaijia2['mc'];?><br />
        	开户银行名称：<?php echo $rowmaijia2['khmc'];?><br />
        	开户银行地址：<?php echo $rowmaijia2['khdz'];?><br />
        	支付宝姓名：<?php echo $rowmaijia2['zubmc'];?><br />
        	支付宝账号：<?php echo $rowmaijia2['email'];?><br />
        	添加时间：<?=date("Y-m-d H:i:s",$rowmaijia2['inputtime'])?><br />
            ip地址：<?=$rowmaijia2['ip']?>
        <?php }?>
        </td>
      </tr>
    </table></td>
  </tr>
</table>
	
  </div>
</center>
</BODY>
</HTML>